home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 316 / libsrc / trap-13.c < prev    next >
Encoding:
Text File  |  1988-10-20  |  989 b   |  38 lines

  1.  
  2. int trap_13_www(args)
  3. long args;
  4. {
  5. /* arg[0] is at a6@(8) */
  6. /* push w, w, w.  more later? */
  7.  
  8.   asm("moveml #0x3FFC,sp@-");        /* save all regs... */
  9.   asm("movel a6@(16),d0");        /* copy w1 */
  10.   asm("movew d0,sp@-");
  11.   asm("movel a6@(12),d0");        /* copy w2 */
  12.   asm("movew d0,sp@-");
  13.   asm("movel a6@(8),d0");        /* copy w1 */
  14.   asm("movew d0,sp@-");
  15.   asm("trap #13");            /* do the trap */
  16.   asm("addl #6,sp");            /* pop junk off stack */
  17.   asm("moveml sp@+,#0x3FFC");        /* restore regs */
  18. }
  19.  
  20.  
  21. int trap_13_wwl(args)
  22. long args;
  23. {
  24. /* arg[0] is at a6@(8) */
  25. /* push w, w, l.  more later? */
  26.  
  27.   asm("moveml #0x3FFC,sp@-");        /* save all regs... */
  28.   asm("movel a6@(16),sp@-");        /* copy l1 */
  29.   asm("movel a6@(12),d0");        /* copy w2 */
  30.   asm("movew d0,sp@-");
  31.   asm("movel a6@(8),d0");        /* copy w1 */
  32.   asm("movew d0,sp@-");
  33.   asm("trap #13");            /* do the trap */
  34.   asm("addl #8,sp");            /* pop junk off stack */
  35.   asm("moveml sp@+,#0x3FFC");        /* restore regs */
  36. }
  37.  
  38.